package view;

import controler.ControleClientes;
import dao.DaoClientes;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JComboBox;
import javax.swing.JFormattedTextField;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.table.DefaultTableModel;
import model.Cliente;
import model.ModeloTabela;

/**
 *
 * @author Tiago
 */
public class TelaClientes extends javax.swing.JInternalFrame {

    private static TelaClientes singleton;
    ControleClientes controleClientes = new ControleClientes();
    DaoClientes daoClientes = new DaoClientes();
    ResultSet rs;

    //Paterns Singleton
    public static TelaClientes getInstance() throws SQLException {
        if (singleton == null) {
            System.out.println("criando TelaClientes");
            singleton = new TelaClientes();
        } else {
            System.out.println("No duplica o obj TelaClientes");
        }
        return singleton;
    }

    /**
     * Creates new form TelaClientes
     */
    private TelaClientes() {
        initComponents();
        jPanelFormCliente.setVisible(false);
        jButtonCancelarCliente1.setVisible(false);
        jPanelDependente.setVisible(false);
        preecheComboBairros();
        
    }

    public void prencherTabelaClientes() throws SQLException {
        ArrayList clientes = controleClientes.retornaCliente(jTextFieldBuscaCliente.getText(), comboProcuraCliente.getSelectedIndex());
        String[] colunas = new String[]{"Código", "Nome", "Cnpj"};
    
    ModeloTabela tableCliente = new ModeloTabela(clientes, colunas);
    
    jTableClientes.setModel(tableCliente);


    jTableClientes.getColumnModel().getColumn(0).setPreferredWidth(80);
    jTableClientes.getColumnModel().getColumn(0).setResizable(false);

    jTableClientes.getColumnModel().getColumn(1).setPreferredWidth(180);
    jTableClientes.getColumnModel().getColumn(1).setResizable(false);

    jTableClientes.getColumnModel().getColumn(2).setPreferredWidth(80);
    jTableClientes.getColumnModel().getColumn(2).setResizable(false);


    jTableClientes.setAutoResizeMode(jTableClientes.AUTO_RESIZE_OFF);
    jTableClientes.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);


    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jTextFieldBuscaCliente = new javax.swing.JTextField();
        jButtonConsultaClienteNome = new javax.swing.JButton();
        comboProcuraCliente = new javax.swing.JComboBox();
        jPanelFormCliente = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        matriculaCadastroCliente = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        nomeCliente = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        cpfCliente = new javax.swing.JFormattedTextField();
        jLabel5 = new javax.swing.JLabel();
        telefoneResidencial = new javax.swing.JFormattedTextField();
        jLabel6 = new javax.swing.JLabel();
        telefoneCelular = new javax.swing.JFormattedTextField();
        jLabel7 = new javax.swing.JLabel();
        DataNascimentoCliente = new javax.swing.JFormattedTextField();
        jLabel8 = new javax.swing.JLabel();
        enderecoCliente = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        enderecoComplemento = new javax.swing.JTextField();
        salvarCliente = new javax.swing.JButton();
        jButtonCancelarCliente = new javax.swing.JButton();
        jButtonCancelarCliente1 = new javax.swing.JButton();
        jLabel15 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        enderecoNumero = new javax.swing.JTextField();
        jComboBoxBairros = new javax.swing.JComboBox();
        jButtonAdicionarCliente = new javax.swing.JButton();
        jButtonEditarCliente = new javax.swing.JButton();
        jButtonExcluirCliente = new javax.swing.JButton();
        jPanelDependente = new javax.swing.JPanel();
        nomeDependente = new javax.swing.JTextField();
        dataNascimentoDependente = new javax.swing.JFormattedTextField();
        jLabel14 = new javax.swing.JLabel();
        telefoneCelularDependente = new javax.swing.JFormattedTextField();
        jButtonCancelarDependente = new javax.swing.JButton();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        salvarDpendente = new javax.swing.JButton();
        jPanelGridClientes = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTableClientes = new javax.swing.JTable();
        fechaClientes = new javax.swing.JButton();

        setResizable(true);
        setTitle("Clientes");
        setToolTipText("");
        setPreferredSize(new java.awt.Dimension(1217, 700));

        jTextFieldBuscaCliente.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTextFieldBuscaClienteMouseClicked(evt);
            }
        });

        jButtonConsultaClienteNome.setIcon(new javax.swing.ImageIcon("C:\\Users\\Tiago\\Dropbox\\ProjetoIntegrador\\ProjetoVideoLocadora\\img\\icones\\PNG\\45.png")); // NOI18N
        jButtonConsultaClienteNome.setToolTipText("Procurar Cliente");
        jButtonConsultaClienteNome.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonConsultaClienteNomeActionPerformed(evt);
            }
        });

        comboProcuraCliente.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Código", "Nome" }));

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(comboProcuraCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jTextFieldBuscaCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 259, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonConsultaClienteNome, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButtonConsultaClienteNome, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jTextFieldBuscaCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(comboProcuraCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(47, 47, 47))
        );

        jPanelFormCliente.setEnabled(false);

        jLabel2.setFont(new java.awt.Font("Trebuchet MS", 0, 18)); // NOI18N
        jLabel2.setText("Matricula:");

        matriculaCadastroCliente.setFont(new java.awt.Font("Trebuchet MS", 0, 18)); // NOI18N
        matriculaCadastroCliente.setEnabled(false);

        jLabel3.setFont(new java.awt.Font("Trebuchet MS", 0, 18)); // NOI18N
        jLabel3.setText("Nome:");

        nomeCliente.setFont(new java.awt.Font("Trebuchet MS", 0, 18)); // NOI18N
        nomeCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                nomeClienteActionPerformed(evt);
            }
        });

        jLabel4.setFont(new java.awt.Font("Trebuchet MS", 0, 18)); // NOI18N
        jLabel4.setText("CPF:");

        try {
            cpfCliente.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        cpfCliente.setToolTipText("Digite somente numeros.");

        jLabel5.setFont(new java.awt.Font("Trebuchet MS", 0, 18)); // NOI18N
        jLabel5.setText("Telefone Residencial:");

        try {
            telefoneResidencial.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##)####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        jLabel6.setFont(new java.awt.Font("Trebuchet MS", 0, 18)); // NOI18N
        jLabel6.setText("Tefone Celular:");

        try {
            telefoneCelular.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##)####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        jLabel7.setFont(new java.awt.Font("Trebuchet MS", 0, 18)); // NOI18N
        jLabel7.setText("Data de Nascimento:");

        try {
            DataNascimentoCliente.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        jLabel8.setFont(new java.awt.Font("Trebuchet MS", 0, 18)); // NOI18N
        jLabel8.setText("Endereço:");

        enderecoCliente.setFont(new java.awt.Font("Trebuchet MS", 0, 18)); // NOI18N
        enderecoCliente.setText("R:");

        jLabel9.setFont(new java.awt.Font("Trebuchet MS", 0, 18)); // NOI18N
        jLabel9.setText("Complemento:");

        enderecoComplemento.setFont(new java.awt.Font("Trebuchet MS", 0, 18)); // NOI18N

        salvarCliente.setFont(new java.awt.Font("Trebuchet MS", 0, 12)); // NOI18N
        salvarCliente.setIcon(new javax.swing.ImageIcon("C:\\Users\\Tiago\\Dropbox\\ProjetoIntegrador\\ProjetoVideoLocadora\\img\\icones\\PNG\\3.png")); // NOI18N
        salvarCliente.setText("Salvar");
        salvarCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                salvarClienteActionPerformed(evt);
            }
        });

        jButtonCancelarCliente.setFont(new java.awt.Font("Trebuchet MS", 0, 12)); // NOI18N
        jButtonCancelarCliente.setIcon(new javax.swing.ImageIcon("C:\\Users\\Tiago\\Dropbox\\ProjetoIntegrador\\ProjetoVideoLocadora\\img\\icones\\PNG\\Cancel Red Button.png")); // NOI18N
        jButtonCancelarCliente.setText("Cancelar");
        jButtonCancelarCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonCancelarClienteActionPerformed(evt);
            }
        });

        jButtonCancelarCliente1.setFont(new java.awt.Font("Trebuchet MS", 0, 12)); // NOI18N
        jButtonCancelarCliente1.setIcon(new javax.swing.ImageIcon("C:\\Users\\Tiago\\Dropbox\\ProjetoIntegrador\\ProjetoVideoLocadora\\img\\icones\\PNG\\group_add.png")); // NOI18N
        jButtonCancelarCliente1.setText("Dependente");
        jButtonCancelarCliente1.setDoubleBuffered(true);
        jButtonCancelarCliente1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonCancelarCliente1ActionPerformed(evt);
            }
        });

        jLabel15.setText("Nº:");

        jLabel10.setText("Bairro:");

        jComboBoxBairros.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxBairrosActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelFormClienteLayout = new javax.swing.GroupLayout(jPanelFormCliente);
        jPanelFormCliente.setLayout(jPanelFormClienteLayout);
        jPanelFormClienteLayout.setHorizontalGroup(
            jPanelFormClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                .addGroup(jPanelFormClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                        .addGroup(jPanelFormClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel5)
                            .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                                .addComponent(jLabel4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(cpfCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                                .addComponent(jLabel2)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(matriculaCadastroCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel3)))
                        .addGroup(jPanelFormClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                                .addGap(14, 14, 14)
                                .addComponent(telefoneResidencial, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(28, 28, 28)
                                .addComponent(jLabel6)
                                .addGap(18, 18, 18)
                                .addComponent(telefoneCelular, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                                .addGap(59, 59, 59)
                                .addComponent(jLabel7)
                                .addGap(38, 38, 38)
                                .addComponent(DataNascimentoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(nomeCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 422, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                        .addComponent(salvarCliente)
                        .addGap(11, 11, 11)
                        .addComponent(jButtonCancelarCliente)
                        .addGap(13, 13, 13)
                        .addComponent(jButtonCancelarCliente1))
                    .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addGap(39, 39, 39)
                        .addComponent(enderecoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 511, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel15)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(enderecoNumero, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel9)
                        .addGap(4, 4, 4)
                        .addComponent(enderecoComplemento, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jComboBoxBairros, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(58, 58, 58))
        );
        jPanelFormClienteLayout.setVerticalGroup(
            jPanelFormClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addGroup(jPanelFormClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                        .addGroup(jPanelFormClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(matriculaCadastroCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(nomeCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(3, 3, 3)
                        .addGroup(jPanelFormClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                                .addGap(6, 6, 6)
                                .addGroup(jPanelFormClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(cpfCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(jPanelFormClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(DataNascimentoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(5, 5, 5)
                        .addGroup(jPanelFormClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel5)
                            .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                                .addGap(4, 4, 4)
                                .addComponent(telefoneResidencial, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                                .addGap(5, 5, 5)
                                .addComponent(jLabel6))
                            .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                                .addGap(4, 4, 4)
                                .addComponent(telefoneCelular, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanelFormClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                                .addGap(8, 8, 8)
                                .addComponent(jLabel8))
                            .addComponent(enderecoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanelFormClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                                .addGap(4, 4, 4)
                                .addGroup(jPanelFormClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                                        .addGap(6, 6, 6)
                                        .addComponent(jLabel9))
                                    .addComponent(enderecoComplemento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jComboBoxBairros, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(jPanelFormClienteLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanelFormClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel15)
                                    .addComponent(enderecoNumero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addComponent(jLabel10))
                .addGap(29, 29, 29)
                .addGroup(jPanelFormClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(salvarCliente)
                    .addComponent(jButtonCancelarCliente)
                    .addComponent(jButtonCancelarCliente1, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        jButtonAdicionarCliente.setFont(new java.awt.Font("Trebuchet MS", 0, 14)); // NOI18N
        jButtonAdicionarCliente.setIcon(new javax.swing.ImageIcon("C:\\Users\\Tiago\\Dropbox\\ProjetoIntegrador\\ProjetoVideoLocadora\\img\\icones\\PNG\\Add.png")); // NOI18N
        jButtonAdicionarCliente.setText("Adicionar");
        jButtonAdicionarCliente.setToolTipText("Adicionar Novo Cliente");
        jButtonAdicionarCliente.setFocusable(false);
        jButtonAdicionarCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonAdicionarClienteActionPerformed(evt);
            }
        });

        jButtonEditarCliente.setFont(new java.awt.Font("Trebuchet MS", 0, 14)); // NOI18N
        jButtonEditarCliente.setIcon(new javax.swing.ImageIcon("C:\\Users\\Tiago\\Dropbox\\ProjetoIntegrador\\ProjetoVideoLocadora\\img\\icones\\PNG\\Write Document.png")); // NOI18N
        jButtonEditarCliente.setText("Editar");
        jButtonEditarCliente.setEnabled(false);
        jButtonEditarCliente.setFocusable(false);
        jButtonEditarCliente.setMaximumSize(new java.awt.Dimension(129, 41));
        jButtonEditarCliente.setMinimumSize(new java.awt.Dimension(129, 41));
        jButtonEditarCliente.setOpaque(false);
        jButtonEditarCliente.setPreferredSize(new java.awt.Dimension(192, 41));

        jButtonExcluirCliente.setFont(new java.awt.Font("Trebuchet MS", 0, 14)); // NOI18N
        jButtonExcluirCliente.setIcon(new javax.swing.ImageIcon("C:\\Users\\Tiago\\Dropbox\\ProjetoIntegrador\\ProjetoVideoLocadora\\img\\icones\\PNG\\Trash Full.png")); // NOI18N
        jButtonExcluirCliente.setText("Excluir");
        jButtonExcluirCliente.setToolTipText("Adicionar Novo Cliente");
        jButtonExcluirCliente.setEnabled(false);
        jButtonExcluirCliente.setFocusable(false);
        jButtonExcluirCliente.setPreferredSize(new java.awt.Dimension(129, 41));
        jButtonExcluirCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonExcluirClienteActionPerformed(evt);
            }
        });

        jPanelDependente.setEnabled(false);

        try {
            dataNascimentoDependente.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        jLabel14.setFont(new java.awt.Font("Trebuchet MS", 0, 18)); // NOI18N
        jLabel14.setText("Tefone Celular:");

        try {
            telefoneCelularDependente.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##)####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        jButtonCancelarDependente.setFont(new java.awt.Font("Trebuchet MS", 0, 12)); // NOI18N
        jButtonCancelarDependente.setIcon(new javax.swing.ImageIcon("C:\\Users\\Tiago\\Dropbox\\ProjetoIntegrador\\ProjetoVideoLocadora\\img\\icones\\PNG\\Cancel Red Button.png")); // NOI18N
        jButtonCancelarDependente.setText("Cancelar");
        jButtonCancelarDependente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonCancelarDependenteActionPerformed(evt);
            }
        });

        jLabel12.setFont(new java.awt.Font("Trebuchet MS", 0, 18)); // NOI18N
        jLabel12.setText("Nome Dependende:");

        jLabel13.setFont(new java.awt.Font("Trebuchet MS", 0, 18)); // NOI18N
        jLabel13.setText("Data de Nascimento:");

        salvarDpendente.setFont(new java.awt.Font("Trebuchet MS", 0, 12)); // NOI18N
        salvarDpendente.setIcon(new javax.swing.ImageIcon("C:\\Users\\Tiago\\Dropbox\\ProjetoIntegrador\\ProjetoVideoLocadora\\img\\icones\\PNG\\3.png")); // NOI18N
        salvarDpendente.setText("Salvar");
        salvarDpendente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                salvarDpendenteActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelDependenteLayout = new javax.swing.GroupLayout(jPanelDependente);
        jPanelDependente.setLayout(jPanelDependenteLayout);
        jPanelDependenteLayout.setHorizontalGroup(
            jPanelDependenteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDependenteLayout.createSequentialGroup()
                .addGroup(jPanelDependenteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelDependenteLayout.createSequentialGroup()
                        .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 167, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(nomeDependente, javax.swing.GroupLayout.PREFERRED_SIZE, 327, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelDependenteLayout.createSequentialGroup()
                        .addGroup(jPanelDependenteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanelDependenteLayout.createSequentialGroup()
                                .addComponent(salvarDpendente)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButtonCancelarDependente))
                            .addGroup(jPanelDependenteLayout.createSequentialGroup()
                                .addComponent(jLabel13)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(dataNascimentoDependente, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel14)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(telefoneCelularDependente, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addGap(21, 21, 21))
        );
        jPanelDependenteLayout.setVerticalGroup(
            jPanelDependenteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDependenteLayout.createSequentialGroup()
                .addContainerGap(41, Short.MAX_VALUE)
                .addGroup(jPanelDependenteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(nomeDependente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDependenteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(dataNascimentoDependente, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel14, javax.swing.GroupLayout.DEFAULT_SIZE, 24, Short.MAX_VALUE)
                    .addComponent(telefoneCelularDependente, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelDependenteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(salvarDpendente)
                    .addComponent(jButtonCancelarDependente))
                .addContainerGap())
        );

        jTableClientes.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        jTableClientes.setColumnSelectionAllowed(true);
        jScrollPane1.setViewportView(jTableClientes);
        jTableClientes.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);

        javax.swing.GroupLayout jPanelGridClientesLayout = new javax.swing.GroupLayout(jPanelGridClientes);
        jPanelGridClientes.setLayout(jPanelGridClientesLayout);
        jPanelGridClientesLayout.setHorizontalGroup(
            jPanelGridClientesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelGridClientesLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 498, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanelGridClientesLayout.setVerticalGroup(
            jPanelGridClientesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelGridClientesLayout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 28, Short.MAX_VALUE))
        );

        fechaClientes.setIcon(new javax.swing.ImageIcon("C:\\Users\\Tiago\\Dropbox\\ProjetoIntegrador\\ProjetoVideoLocadora\\img\\icones\\PNG\\2.png")); // NOI18N
        fechaClientes.setText("Fechar");
        fechaClientes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                fechaClientesActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanelGridClientes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(23, 23, 23)))
                .addGap(28, 28, 28)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jButtonAdicionarCliente)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButtonEditarCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButtonExcluirCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(fechaClientes, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanelFormCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanelDependente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(690, 690, 690))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanelGridClientes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jButtonAdicionarCliente, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jButtonExcluirCliente, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 73, Short.MAX_VALUE)
                            .addComponent(jButtonEditarCliente, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(fechaClientes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addComponent(jPanelFormCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanelDependente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(144, 144, 144))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonConsultaClienteNomeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonConsultaClienteNomeActionPerformed
        try {
          this.prencherTabelaClientes();
        } catch (SQLException ex) {
            Logger.getLogger(TelaClientes.class.getName()).log(Level.SEVERE, null, ex);
        }



    }//GEN-LAST:event_jButtonConsultaClienteNomeActionPerformed

    private void jTextFieldBuscaClienteMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextFieldBuscaClienteMouseClicked
        jTextFieldBuscaCliente.setText(null);
    }//GEN-LAST:event_jTextFieldBuscaClienteMouseClicked

    private void nomeClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nomeClienteActionPerformed
    }//GEN-LAST:event_nomeClienteActionPerformed

    private void jButtonAdicionarClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAdicionarClienteActionPerformed
        jPanelFormCliente.setVisible(true);
        



    }//GEN-LAST:event_jButtonAdicionarClienteActionPerformed
    public void preecheComboBairros() {

        jComboBoxBairros.addItem("Selecione o Bairro");
        controleClientes.retornaBairros();
        while (controleClientes.i >= 0) {
            jComboBoxBairros.addItem(controleClientes.bairros.get(controleClientes.i));
            controleClientes.i = controleClientes.i - 1;
        }
    }
    private void jButtonExcluirClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonExcluirClienteActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonExcluirClienteActionPerformed

    private void salvarClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_salvarClienteActionPerformed
        this.validaAdicionaCliente();
        /*String cpfCliente = this.cpfCliente.getValue().toString();
         String enderecoCliente = this.enderecoCliente.getText();
         String nomeCliente = this.nomeCliente.getText();
         int situacao = 1;
         String dataNasCliente = this.DataNascimentoCliente.getValue().toString();
         String telefoneCliente = this.telefoneResidencial.getValue().toString();
         String telefoneCelularCliente = this.telefoneCelular.getValue().toString();
         String enderecoComplemento = this.enderecoComplemento.getText();
         int clientePai = -0;
         String enderecoNumero = this.enderecoNumero.getText();
         String bairro = this.comboBairros.getSelectedItem().toString();
        
        
        
        

        
         ControleClientes controleCliente = new ControleClientes();*/
        //       controleCliente.validaCliente(this.nomeCliente.getText(), this.cpfCliente.getValue(), this.enderecoCliente.getText(), enderecoNumero.getText(), this.enderecoCliente.getText(), this.telefoneResidencial.getText(), this.telefoneCelular.getText(), this.DataNascimentoCliente.getValue().toString(), -0, this.enderecoNumero.getText(), bairro);




    }//GEN-LAST:event_salvarClienteActionPerformed

    private void jButtonCancelarCliente1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCancelarCliente1ActionPerformed
        jPanelDependente.setVisible(true);
    }//GEN-LAST:event_jButtonCancelarCliente1ActionPerformed

    private void salvarDpendenteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_salvarDpendenteActionPerformed
    }//GEN-LAST:event_salvarDpendenteActionPerformed

    private void validaAdicionaCliente() {
        int flag = 0;
        String validacao = "Campos de Preenchimento Obrigatório";
        if (this.nomeCliente.getText().isEmpty()) {
            validacao = validacao + "\n* Campo Nome deve ser Preenchido";
            flag = 1;
            System.out.println(this.cpfCliente.getValue());
        }
        if (this.cpfCliente.getValue() == null) {
            validacao = validacao + "\n* Campo Cpf deve ser Preenchido";
            flag = 1;

        }
        if (this.telefoneResidencial.getText().isEmpty()) {
            validacao = validacao + "\n*Campo Telefone Residencial deve ser preenchido";
            flag = 1;
        }
        if (this.DataNascimentoCliente.getValue() == null) {
            validacao = validacao + "\n*Campo Data Nascimento deve ser preenchido";

        }
        if (this.enderecoCliente.getText() == null) {
            validacao = validacao + "\n*Campo Endereço deve ser preenchido";
        }
        if (this.enderecoNumero.getText() == null) {
            validacao = validacao + "\n*Campo Nº Endereço deve ser preenchido";
        }
        //if(this.comboBairros.getSelectedIndex()==0){
        //validacao= validacao +"\n*Campo Bairro deve ser selecionado";


        // }


        if (flag == 1) {
            JOptionPane.showMessageDialog(this, validacao);


        }
    }

    private void jButtonCancelarClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCancelarClienteActionPerformed
        enderecoComplemento.setText(null);
        enderecoCliente.setText(null);
        nomeCliente.setText(null);
        cpfCliente.setText(null);
        DataNascimentoCliente.setText(null);
        telefoneResidencial.setText(null);
        telefoneCelular.setText(null);
    }//GEN-LAST:event_jButtonCancelarClienteActionPerformed

    private void jButtonCancelarDependenteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCancelarDependenteActionPerformed
        nomeDependente.setText(null);
        dataNascimentoDependente.setText(null);
        telefoneCelularDependente.setText(null);
    }//GEN-LAST:event_jButtonCancelarDependenteActionPerformed

    private void fechaClientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fechaClientesActionPerformed
        this.setVisible(false);
    }//GEN-LAST:event_fechaClientesActionPerformed

    private void jComboBoxBairrosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxBairrosActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jComboBoxBairrosActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JFormattedTextField DataNascimentoCliente;
    private javax.swing.JComboBox comboProcuraCliente;
    private javax.swing.JFormattedTextField cpfCliente;
    private javax.swing.JFormattedTextField dataNascimentoDependente;
    private javax.swing.JTextField enderecoCliente;
    private javax.swing.JTextField enderecoComplemento;
    private javax.swing.JTextField enderecoNumero;
    private javax.swing.JButton fechaClientes;
    private javax.swing.JButton jButtonAdicionarCliente;
    private javax.swing.JButton jButtonCancelarCliente;
    private javax.swing.JButton jButtonCancelarCliente1;
    private javax.swing.JButton jButtonCancelarDependente;
    private javax.swing.JButton jButtonConsultaClienteNome;
    private javax.swing.JButton jButtonEditarCliente;
    private javax.swing.JButton jButtonExcluirCliente;
    private javax.swing.JComboBox jComboBoxBairros;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanelDependente;
    private javax.swing.JPanel jPanelFormCliente;
    private javax.swing.JPanel jPanelGridClientes;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTableClientes;
    private javax.swing.JTextField jTextFieldBuscaCliente;
    private javax.swing.JTextField matriculaCadastroCliente;
    private javax.swing.JTextField nomeCliente;
    private javax.swing.JTextField nomeDependente;
    private javax.swing.JButton salvarCliente;
    private javax.swing.JButton salvarDpendente;
    private javax.swing.JFormattedTextField telefoneCelular;
    private javax.swing.JFormattedTextField telefoneCelularDependente;
    private javax.swing.JFormattedTextField telefoneResidencial;
    // End of variables declaration//GEN-END:variables


    public JTextField getEnderecoNumero() {
        return enderecoNumero;
    }

    public JFormattedTextField getDataNascimentoCliente() {
        return DataNascimentoCliente;
    }

    public JFormattedTextField getDataNascimentoDependente() {
        return dataNascimentoDependente;
    }

    public JFormattedTextField getTelefoneCelular() {
        return telefoneCelular;
    }

    public void setTelefoneCelular(JFormattedTextField telefoneCelular) {
        this.telefoneCelular = telefoneCelular;
    }

    public JFormattedTextField getTelefoneCelularDependente() {
        return telefoneCelularDependente;
    }

    public void setTelefoneCelularDependente(JFormattedTextField telefoneCelularDependente) {
        this.telefoneCelularDependente = telefoneCelularDependente;
    }

    public JFormattedTextField getTelefoneResidencial() {
        return telefoneResidencial;
    }

    public void setTelefoneResidencial(JFormattedTextField telefoneResidencial) {
        this.telefoneResidencial = telefoneResidencial;
    }

    public JTextField getEnderecoComplemento() {
        return enderecoComplemento;
    }

    public void setEnderecoComplemento(JTextField enderecoComplemento) {
        this.enderecoComplemento = enderecoComplemento;
    }

    public JFormattedTextField getcpfCliente() {
        return cpfCliente;
    }

    public void setcpfCliente(JFormattedTextField jFormattedTextFieldCpfCliente) {
        this.cpfCliente = jFormattedTextFieldCpfCliente;
    }

    public JTextField getNomeCliente() {
        return nomeCliente;
    }

    public void setNomeCliente(JTextField nomeCliente) {
        this.nomeCliente = nomeCliente;
    }

    public JTextField getEnderecoCliente() {
        return enderecoCliente;
    }

    public void setEnderecoCliente(JTextField enderecoCliente) {
        this.enderecoCliente = enderecoCliente;
    }



}
